home *** CD-ROM | disk | FTP | other *** search
- onClipEvent(enterFrame){
- if(!pause)
- {
- if(eval("variables:arrowCounter") < eval("variables:arrowAmount"))
- {
- if(eval("variables:arrowCurrentSpace") >= eval("variables:arrowSpacer"))
- {
- duplicateMovieClip(_parent.arrow,"arrow" + eval("variables:arrowCounter"),16384 + eval("variables:arrowCounter"));
- eval("_parent.arrow" + eval("variables:arrowCounter")).orientation = 1;
- eval("_parent.arrow" + eval("variables:arrowCounter")).success = false;
- frame = random(eval("variables:arrowPossibilities") + 1);
- eval("_parent.arrow" + eval("variables:arrowCounter")).gotoAndStop(frame);
- §variables:arrowCounter§++;
- set("variables:arrowCurrentSpace",0);
- }
- else
- {
- set("variables:arrowCurrentSpace",eval("variables:arrowCurrentSpace") + eval("variables:arrowSpeed"));
- }
- }
- i = eval("variables:currentLeadArrow");
- while(i < eval("variables:arrowCounter"))
- {
- arrowPointer = eval("_parent.arrow" + i);
- arrowPointer._x += eval("variables:arrowSpeed");
- if(arrowPointer._x >= eval("variables:endOfRun") - 60 && arrowPointer._x < eval("variables:endOfRun") && arrowPointer)
- {
- arrowPointer.arrow.play();
- if(arrowPointer.orientation == 1 && eval("keyboard_listener:up") && !eval("keyboard_listener:down") && !eval("keyboard_listener:left") && !eval("keyboard_listener:right") && !arrowPointer.success)
- {
- arrowPointer.success = true;
- if(eval("variables:currentLeadArrow") == eval("variables:arrowAmount") - 1)
- {
- trace("CAST");
- removeMovieClip(arrowPointer);
- _parent.player.character.gotoAndPlay("cast");
- pause = true;
- }
- else
- {
- _parent.grim.gotoAndPlay("success");
- colorChanger.play();
- _parent.player.character.gotoAndPlay("up");
- }
- }
- else if(arrowPointer.orientation == 2 && !eval("keyboard_listener:up") && !eval("keyboard_listener:down") && !eval("keyboard_listener:left") && eval("keyboard_listener:right") && !arrowPointer.success)
- {
- arrowPointer.success = true;
- if(eval("variables:currentLeadArrow") == eval("variables:arrowAmount") - 1)
- {
- trace("CAST");
- removeMovieClip(arrowPointer);
- _parent.player.character.gotoAndPlay("cast");
- pause = true;
- }
- else
- {
- _parent.grim.gotoAndPlay("success");
- colorChanger.play();
- _parent.player.character.gotoAndPlay("right");
- }
- }
- else if(arrowPointer.orientation == 3 && !eval("keyboard_listener:up") && eval("keyboard_listener:down") && !eval("keyboard_listener:left") && !eval("keyboard_listener:right") && !arrowPointer.success)
- {
- arrowPointer.success = true;
- if(eval("variables:currentLeadArrow") == eval("variables:arrowAmount") - 1)
- {
- trace("CAST");
- removeMovieClip(arrowPointer);
- _parent.player.character.gotoAndPlay("cast");
- pause = true;
- }
- else
- {
- _parent.grim.gotoAndPlay("success");
- colorChanger.play();
- _parent.player.character.gotoAndPlay("down");
- }
- }
- else if(arrowPointer.orientation == 4 && !eval("keyboard_listener:up") && !eval("keyboard_listener:down") && eval("keyboard_listener:left") && !eval("keyboard_listener:right") && !arrowPointer.success)
- {
- arrowPointer.success = true;
- if(eval("variables:currentLeadArrow") == eval("variables:arrowAmount") - 1)
- {
- trace("CAST");
- removeMovieClip(arrowPointer);
- _parent.player.character.gotoAndPlay("cast");
- pause = true;
- }
- else
- {
- _parent.grim.gotoAndPlay("success");
- colorChanger.play();
- _parent.player.character.gotoAndPlay("left");
- }
- }
- else if(arrowPointer.orientation == 5 && eval("keyboard_listener:up") && !eval("keyboard_listener:down") && !eval("keyboard_listener:left") && eval("keyboard_listener:right") && !arrowPointer.success)
- {
- arrowPointer.success = true;
- if(eval("variables:currentLeadArrow") == eval("variables:arrowAmount") - 1)
- {
- trace("CAST");
- removeMovieClip(arrowPointer);
- _parent.player.character.gotoAndPlay("cast");
- pause = true;
- }
- else
- {
- _parent.grim.gotoAndPlay("success");
- colorChanger.play();
- _parent.player.character.gotoAndPlay("up-right");
- }
- }
- else if(arrowPointer.orientation == 6 && eval("keyboard_listener:up") && eval("keyboard_listener:down") && !eval("keyboard_listener:left") && !eval("keyboard_listener:right") && !arrowPointer.success)
- {
- arrowPointer.success = true;
- if(eval("variables:currentLeadArrow") == eval("variables:arrowAmount") - 1)
- {
- trace("CAST");
- removeMovieClip(arrowPointer);
- _parent.player.character.gotoAndPlay("cast");
- pause = true;
- }
- else
- {
- _parent.grim.gotoAndPlay("success");
- colorChanger.play();
- _parent.player.character.gotoAndPlay("up-down");
- }
- }
- else if(arrowPointer.orientation == 7 && eval("keyboard_listener:up") && !eval("keyboard_listener:down") && eval("keyboard_listener:left") && !eval("keyboard_listener:right") && !arrowPointer.success)
- {
- arrowPointer.success = true;
- if(eval("variables:currentLeadArrow") == eval("variables:arrowAmount") - 1)
- {
- trace("CAST");
- removeMovieClip(arrowPointer);
- _parent.player.character.gotoAndPlay("cast");
- pause = true;
- }
- else
- {
- _parent.grim.gotoAndPlay("success");
- colorChanger.play();
- _parent.player.character.gotoAndPlay("up-left");
- }
- }
- else if(arrowPointer.orientation == 8 && !eval("keyboard_listener:up") && eval("keyboard_listener:down") && !eval("keyboard_listener:left") && eval("keyboard_listener:right") && !arrowPointer.success)
- {
- arrowPointer.success = true;
- if(eval("variables:currentLeadArrow") == eval("variables:arrowAmount") - 1)
- {
- trace("CAST");
- removeMovieClip(arrowPointer);
- _parent.player.character.gotoAndPlay("cast");
- pause = true;
- }
- else
- {
- _parent.grim.gotoAndPlay("success");
- colorChanger.play();
- _parent.player.character.gotoAndPlay("right-down");
- }
- }
- else if(arrowPointer.orientation == 9 && !eval("keyboard_listener:up") && !eval("keyboard_listener:down") && eval("keyboard_listener:left") && eval("keyboard_listener:right") && !arrowPointer.success)
- {
- arrowPointer.success = true;
- if(eval("variables:currentLeadArrow") == eval("variables:arrowAmount") - 1)
- {
- trace("CAST");
- removeMovieClip(arrowPointer);
- _parent.player.character.gotoAndPlay("cast");
- pause = true;
- }
- else
- {
- _parent.grim.gotoAndPlay("success");
- colorChanger.play();
- _parent.player.character.gotoAndPlay("right-left");
- }
- }
- else if(arrowPointer.orientation == 10 && !eval("keyboard_listener:up") && eval("keyboard_listener:down") && eval("keyboard_listener:left") && !eval("keyboard_listener:right") && !arrowPointer.success)
- {
- arrowPointer.success = true;
- if(eval("variables:currentLeadArrow") == eval("variables:arrowAmount") - 1)
- {
- trace("CAST");
- removeMovieClip(arrowPointer);
- _parent.player.character.gotoAndPlay("cast");
- pause = true;
- }
- else
- {
- _parent.grim.gotoAndPlay("success");
- colorChanger.play();
- _parent.player.character.gotoAndPlay("left-down");
- }
- }
- }
- if(arrowPointer._x >= eval("variables:endOfRun") && arrowPointer)
- {
- if(!arrowPointer.success)
- {
- if(eval("variables:currentLeadArrow") == eval("variables:arrowAmount") - 1 && _parent.lifebar._currentframe != 3)
- {
- trace("CAST");
- removeMovieClip(arrowPointer);
- _parent.player.character.gotoAndPlay("cast");
- pause = true;
- }
- else
- {
- _parent.lifebar.play();
- goodWrong.gotoAndPlay("wrong");
- _parent.grim.gotoAndPlay("failure");
- }
- }
- §variables:currentLeadArrow§++;
- removeMovieClip(arrowPointer);
- }
- i++;
- }
- }
- }
-